﻿using System;

using System.Collections.Generic;
using System.Text;
using System.Drawing;
using Silvermoon.Utils;
using Silvermoon.OpenGL.Native;

namespace Silvermoon.Windows
{
    public static class PhoneColors
    {

        public static readonly Color White = Color.White;
        public static readonly Color Light = ColorUtil.FromArgb(255, 190, 190, 190);
        public static readonly Color MediumLight = ColorUtil.FromArgb(255, 164, 164, 164);
        public static readonly Color Medium = ColorUtil.FromArgb(255, 100, 100, 100);
        public static readonly Color MediumDark2 = ColorUtil.FromArgb(255, 75, 75, 75);
        public static readonly Color MediumDark = ColorUtil.FromArgb(255, 58, 61, 58);
        public static readonly Color Dark = ColorUtil.FromArgb(255, 32, 32, 32);
        public static readonly Color Black = Color.Black;

        public static readonly Color Transparent = Color.Transparent;
        public static Color Empty { get { return Color.Empty; } }

        /// <summary>
        /// Skyblue color prevered to be used for highlightening.
        /// </summary>
        public static readonly Color Highlight = Color.FromArgb(148, 200, 224);

        public static readonly Color Magenta = ColorUtil.FromArgb(0xff0097);
        public static readonly Color Purple = ColorUtil.FromArgb(0xa200ff);
        public static readonly Color Teal = ColorUtil.FromArgb(0x00aba9);
        public static readonly Color Lime = ColorUtil.FromArgb(0x8cbf26);
        public static readonly Color Brown = ColorUtil.FromArgb(0x996600);
        public static readonly Color Pink = ColorUtil.FromArgb(0xE671B5);
        public static readonly Color OrangeP7 = ColorUtil.FromArgb(0xf09609);
        public static readonly Color Blue = ColorUtil.FromArgb(0x1ba1e2);
        public static readonly Color Red = ColorUtil.FromArgb(0xe51e00);
        public static readonly Color Green = ColorUtil.FromArgb(0x339933);
        public static readonly Color Yellow = Color.FromArgb(255, 194, 17);
        public static readonly Color Orange = Color.FromArgb(254, 88, 21);

        /// <summary>
        /// blue color which is prefered to highlight text.
        /// </summary>
        public static readonly Color DeepBlue = Color.FromArgb(0, 0x44, 0xcc);


        //public static readonly Color Blue = Color.FromArgb(27, 161, 226);
        //public static readonly Color Green = Color.FromArgb(107, 189, 70);
        //public static readonly Color Red = Color.FromArgb(255, 0, 0);
        public static readonly Color GlossyWhite = Color.FromArgb(240, 240, 240);
        public static readonly Color Unfocused = ColorUtil.FromArgb(100, 255, 255, 255);

        /// <summary>
        /// Gets or sets the theme color used for text or borders.
        /// </summary>
        public static  Color Text = Color.White;

        /// <summary>
        /// Gets or sets the theme color used for backgrounds.
        /// </summary>
        public static  Color Background = Color.FromArgb(24, 24, 24);

        /// <summary>
        /// Gets or sets the theme color used for accent.
        /// </summary>
        public static Color Accent = Blue;

        public static Color FromArgb(int a, int r, int g, int b) { return ColorUtil.FromArgb(a, r, g, b); }
        public static Color AlphaColor(this Color color, int alpha) { return ColorUtil.AlphaColor(color, alpha); }
        public static Color AlphaBlend(this Color color1, Color color2, int alpha) { return ColorUtil.AlphaBlendColor(color1, color2, alpha); }
        public static Color SwapRB(this Color color) { return GlColor.FromColor(color).SwapRB(); }
        public static Color FromRgb(int r, int g, int b) { return ColorUtil.GetColor(r, g, b, 255); }
    }
}
